#pragma once
#include "vector3.h"

namespace krryn{
namespace math{
	class ray;
    class matrix;
	class aabb{
	public:
		aabb();
		aabb(vector3f a_Min, vector3f a_Max);
		aabb(const aabb &a_Box);

		void transform(math::matrix &a_Matrix);
		void expand(const vector3f &a_Point);

		aabb combine(const aabb &a_Other) const;
		aabb intersect(const aabb &a_Other) const;

		vector3f center() const;
		vector3f position() const;
		vector3f size() const;
		float area() const;

		void empty();

		bool contains(const vector3f &a_Point) const;
		bool contains_almost(const vector3f &a_Point) const;

		virtual aabb get_aabb() const;
		virtual bool intersects_with_ray(ray &a_Ray) const;

		vector3f m_Min, m_Max;
	};
}
}
